-- elect
-- created by zhuangsl
-- 静电场

return {
    fetchProps = function(who, status, condition)
        local props  = {};
        local propId = PropM.getPropId("dark_force");
        local attack  = tonumber(condition["attack"]);
        local hp = tonumber(condition["hp"]);
        local endRound = condition["end_round"];

        if attack > 0 then
            table.insert(props, { propId, "attack", attack, endRound, });
        end
        
        if hp > 0 then
            table.insert(props, { propId, "hp", hp, endRound, });
        end

        return props;
    end,

    desc = function(who, status, condition)
        -- 获取状态描述
        local cfg = CombatStatusM.getStatusInfo(status);
        local desc = cfg.desc;

        -- 效果，百分比
        local attack  = tonumber(condition["attack"]);
        attack = math.modf(attack / 10);
        desc = string.gsub(desc, "{attack}", attack);
        
        local hp = tonumber(condition["hp"]);
        hp = math.modf(hp / 10);
        desc = string.gsub(desc, "{hp}", hp);


        
        return desc;
    end,
};
